// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import './utils/rem';
import Vue from 'vue'
import App from './App'
import router from './router'
// import axios from 'axios'
// import VueAxios from 'vue-axios'
import 'utils/base'

// Vue.use(VueAxios, axios);
Vue.config.productionTip = false;

//添加新的分支区分项
const hash = location.hash;
if(hash.indexOf("type=stg")>-1) {
  sessionStorage.setItem("env", "stg");
};

router.beforeEach((to, from, next)=>{
  if(to.name=="accidentInfo"&&from.name=="accidentPic") {
    next({ path: '/' });
  }else{
    next();
  }
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
